package com.example.onlinemusic.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.onlinemusic.common.R;
import com.example.onlinemusic.model.domain.Consumer;
import com.example.onlinemusic.model.request.ConsumerRequest;

import javax.servlet.http.HttpSession;

public interface ConsumerService extends IService<Consumer> {
    /**
     * 查询所有用户信息
     *
     * @return
     */
    public R allUser(IPage page);

    /**
     * 删除用户
     *
     * @param id
     * @return
     */
    public R deleteUser(int id);

    /**
     * 批量删除用户
     *
     * @param ids
     * @return
     */
    public R deleteByIds(String[] ids);

    public R userDetail(int id);

    public R allUser();


    /**
     * 用户端登录
     *
     * @param session
     * @return
     */
    public R loginStatus(ConsumerRequest consumerRequest, HttpSession session);

    /**
     * 注册
     *
     * @param consumerRequest
     * @return
     */
    public R addUser(ConsumerRequest consumerRequest);

    /**
     * 更新个人资料
     *
     * @param consumerRequest
     * @return
     */
    public R updateUser(ConsumerRequest consumerRequest);


}
